package cn.zl;

import cn.yunbamboos.application.Application;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

// 开启Spring应该上下文的自动配置
@SpringBootApplication
// mybatis mapper
@MapperScan("cn.zl.mapper")
// 定时任务
@EnableScheduling
public class ZLMain {

    private static final Logger logger = LoggerFactory.getLogger(ZLMain.class);

    /**
     * springboot 程序启动类
     *
     * @param args 启动参数数组
     */
    public static void main(String[] args) {
        ConfigurableApplicationContext context = Application
                .create()
                .addPrimarySource(ZLMain.class)
                .setArgs(args)
                .run();
        logger.info("server start complete {}", context);
        // 输出容器内所有的bean名称 类型
        // SpringBeanHelper.println(context);
    }

}
